package com.example.ws.observer;

/**
 * @author  谢飞机
 * @date    2021-09-16
 */
public interface ChannelState {

    /**
     * Propagated when a connection has been established and is available
     */
    ChannelState CONNECTED =  new ChannelState() {
        @Override
        public String toString() {
            return "[connected]";
        }
    };

    /**
     * Propagated when a connection is being fully closed
     */
    ChannelState DISCONNECTING =  new ChannelState() {
        @Override
        public String toString() {
            return "[disconnecting]";
        }
    };


    @Override
    String toString();


}